﻿/********************************************************************************
    Copyright (C) Binod Nepal, Planet Earth Solutions Pvt. Ltd., Kathmandu.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************************/

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace MixNP.BusinessLayer
{
    public static class Profiles
    {
        public static DataTable GetProfile(string emailAddress)
        {
            return MixNP.DatabaseLayer.Profiles.GetProfile(emailAddress);
        }

        public static bool IsProfilePictureProtected(string emailAddress)
        {
            return MixNP.DatabaseLayer.Profiles.IsProfilePictureProtected(emailAddress);
        }
        
        public static bool UpdateProfile(string emailAddress, bool protectProfilePicture, string sex, string name, string nickName, string cellNumber, bool displayCellNumber, string contactNumber, bool displayContactNumbers, string addressLine1, string addressLine2, string addressLine3, string city)
        {
            return MixNP.DatabaseLayer.Profiles.UpdateProfile(emailAddress, protectProfilePicture, sex, name, nickName, cellNumber, displayCellNumber, contactNumber, displayContactNumbers, addressLine1, addressLine2, addressLine3, city);
        }

        public static bool SaveProfilePicture(string emailAddress, string extension, byte[] picture)
        {
            return MixNP.DatabaseLayer.Profiles.SaveProfilePicture(emailAddress, extension, picture);
        }

        public static bool IsValidCellNumber(string cellNumber)
        {
            return MixNP.DatabaseLayer.Profiles.IsValidCellNumber(cellNumber);
        }

        public static string GetEmailAddress(string cellNumber)
        {
            return MixNP.DatabaseLayer.Profiles.GetEmailAddress(cellNumber);
        }
    }
}
